package data;

import clsaa.AllBiglotto;
import com.google.gson.Gson;

import static data.FileINOUT.FileSaveToJs;
import static data.FileINOUT.readFactsToString;

public class ConfigBigLotto {
    AllBiglotto allbiglotto;

    public ConfigBigLotto(AllBiglotto allbiglotto) {
        this.allbiglotto = allbiglotto;
    }
    public ConfigBigLotto() {
        String jsonStr=readFactsToString("config/AllBiglottoData.json");
        this.allbiglotto = new Gson().fromJson(jsonStr,AllBiglotto.class);
        allbiglotto.initDataNum();
    }

    public AllBiglotto getAllbiglotto() {
        return allbiglotto;
    }
    public void SortFromLargeToSmall(){

    }
    public void setAllbiglotto(AllBiglotto allbiglotto) {
        this.allbiglotto = allbiglotto;
    }

    public void SaveBiglottoINFILE(){
        String jsonStr=new Gson().toJson(allbiglotto);
        FileSaveToJs(jsonStr,"config/AllBiglottoData.json");
    }

}
